package com.akuhome.resource.service;

import com.akuhome.resource.dao.ResourceDao;
import com.akuhome.resource.dto.ClassroomInfo;
import com.akuhome.resource.service.entity.DormitoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
@Service
public class ResourceService {
    @Autowired
    ResourceDao resourceDao;

    @Autowired
    DormitoryService dormitoryService;

    public List<ClassroomInfo> findClassroomNeedDetailInDate(Integer classroomId, Date date){
        List<ClassroomInfo> classroomInfoList;
        if(classroomId == 0){
            classroomInfoList = resourceDao.findAllClassroomNeedDetailInDate(date);
        }else{
            classroomInfoList = resourceDao.findClassroomNeedDetailInDate(classroomId,date);
        }
        return classroomInfoList;
    }

    public List<Object> findRestAccInDate(Date date){
        return null;
    }
}
